package diamondServer.clientserver;

import org.apache.log4j.Logger;

import diamondServer.businesslogic.manager.DefaultBLManager;
import diamondServer.clientserver.threadpool.PoolManager;


public class MainServer {
	
	public static void main(String[] args) {
		
		final Logger log = 
			Logger.getLogger(MainServer.class);
		
		PoolManager poolMgr = new PoolManager();
		DefaultBLManager.getInstance(); //initiate it now
		
		try {
			Server.getInstance().init(1234 , poolMgr);
			log.info("THE SERVER WAS STARTED");
			Server.getInstance().go();
			//now it in the infinite loop of the go()
			
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}
}
